﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using WebAssertTestLibrary.Core;

namespace WebAssert.Tests
{
    [TestClass]
    public class CssValidatorTests
    {
        [TestMethod]
        public void CssValidator_IsValidCss_ReturnsTrueForValidCss()
        {
            // Arrange
            const string css = "body { font-family: Arial, Sans-Serif }";
            var validator = new CssValidator();

            // Act
            var result = validator.IsValidCss(css);

            // Assert
            Assert.IsTrue(result.IsValid);
        }

        [TestMethod]
        public void CssValidator_IsValidCss_ReturnsFalseForInvalidCss()
        {
            // Arrange
            const string css = "body { bad-property: fake }";
            var validator = new CssValidator();

            // Act
            var result = validator.IsValidCss(css);

            // Assert
            Assert.IsFalse(result.IsValid);
        }
    }
}